import request from '@/utils/request'
// 新增视频
export function addVideo(data) {
	return request({
		url: '/admin/resource/course/video',
		method: 'post',
		data,
		showLoading: true
	})
}
// 视频分页
export function pagingVideo(data) {
	return request({
		url: '/admin/resource/course/video/paging',
		method: 'post',
		data,
		showLoading: true
	})
}

// 视频详情
export function getVideoDetail(id) {
	return request({
		url: '/admin/resource/course/video/' + id,
		method: 'get',
		showLoading: true
	})
}
// 修改视频
export function editVideo(data) {
	return request({
		url: '/admin/resource/course/video',
		method: 'put',
		data,
		showLoading: true
	})
}
// 批量删除视频
export function delVideo(idList) {
	return request({
		url: '/admin/resource/course/video/' + idList,
		method: 'delete',
		showLoading: true
	})
}
// 视频上下架
export function publishVideo(data) {
	return request({
		url: '/admin/resource/course/video/publish',
		method: 'put',
		data,
		showLoading: true
	})
}
// 视频导入
export function importVideo(data) {
	return request({
		url: '/admin/resource/course/video/import',
		method: 'post',
		data,
		showLoading: true
	})
}
// 视频导出
export function exportVideo(data) {
	return request({
		url: '/admin/resource/course/video/export',
		method: 'post',
		data,
		showLoading: true
	})
}
